home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 4
/
Precision Software Applications Silver Collection Volume 4 (1993).iso
/
database
/
sr_info.exe
/
EDBROW.PRG
< prev
next >
Wrap
Text File
|
1990-05-29
|
2KB
|
95 lines
*** EDBROW.PRG **
** (C) Copyright 1990, Sub Rosa Publishing Inc.
** A demonstration program provided to SR-Info and VP-Info users.
** This program may be copied freely. If it is used in commercial code,
** please credit the source, Sub Rosa Publishing Inc.
**
** EDBROW is compatible with all current versions of SR-Info and VP-Info.
** EDBROW demonstrates the use of the EDIT and BROWSE commands in tandom to
** work on a file. The consistancy of keystrokes across the two commands
** makes this a very good appoach to data management.
**
** Bernie Melman
** April, 1990
**
*
SET func off ; we want the raw function keys - not the pre-loaded messages.
USE#1 members index members
IF :color <> 7
SET color to 32; black on green
ENDIF
COLOR :color,0,0,24,79,177; fill screen with pattern
* 177 is a shaded fill character.
DO WHILE t; put main menu in an infinite loop
WINDOW 6,18,19,62 double; declare space for menu text
MODE = '?'
ERASE; fills window with blanks
TEXT
DEMO MAIN MENU
0. Exit program and SR-Info.
1. Choose a starting record.
2. Browse current record.
3. Edit current record.
4. Exit program - stay in SR-Info.
ENDTEXT
CURSOR 12,26 ; positions menu cursor over 1st character of 1st choice
SELECTION = menu(4,36); five choices menu bar width 36
DO CASE
CASE selection=0
QUIT
CASE selection=1
PERFORM start_rec
CASE selection=2
mode='B'
CASE selection=3
mode='E'
CASE selection=4
WINDOW; reset window to full screen
CLS; clears screen
CURSOR 0,0; cursor to top left
CANCEL
ENDCASE
WINDOW 2,20
@ 22,5 say "PRESS F1 to toggle between BROWSE and EDIT"
DO WHILE mode <> 'Q'
IF mode='E'
EDIT
IF :key=315
MODE = 'B'
ELSE
mode='Q'
ENDIF
ELSE
BROWSE
IF :key=315
MODE = 'E'
ELSE
mode='Q'
ENDIF
ENDIF
ENDDO
ENDDO
**** END OF EDBROW.PRG ***
PROCEDURE start_rec
CLEAR gets
mkey=blank(10)
ERASE
TEXT
ENTER ESTIMATE OF LAST NAME -
up to 10 characters
LAST NAME: @mkey
ENDTEXT
READ
MKEY = !(trim(mkey)) ; get rid of trailing blanks
FIND &mkey
IF #=0 ; no find - so go to next record
GOTO :near
ENDIF
ENDPROCEDURE; start_rec
** end of EDBROW.PRG **